Optimal. Leaf size=24 \[ \frac{2 \tanh ^{-1}\left (\frac{\sqrt{a+b \cos (x)}}{\sqrt{a}}\right )}{\sqrt{a}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0579263, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {2721, 63, 207} \[ \frac{2 \tanh ^{-1}\left (\frac{\sqrt{a+b \cos (x)}}{\sqrt{a}}\right )}{\sqrt{a}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2721
Rule 63
Rule 207
Rubi steps
\begin{align*} \int \frac{\tan (x)}{\sqrt{a+b \cos (x)}} \, dx &=-\operatorname{Subst}\left (\int \frac{1}{x \sqrt{a+x}} \, dx,x,b \cos (x)\right )\\ &=-\left (2 \operatorname{Subst}\left (\int \frac{1}{-a+x^2} \, dx,x,\sqrt{a+b \cos (x)}\right )\right )\\ &=\frac{2 \tanh ^{-1}\left (\frac{\sqrt{a+b \cos (x)}}{\sqrt{a}}\right )}{\sqrt{a}}\\ \end{align*}
Mathematica [A] time = 0.0114887, size = 24, normalized size = 1. \[ \frac{2 \tanh ^{-1}\left (\frac{\sqrt{a+b \cos (x)}}{\sqrt{a}}\right )}{\sqrt{a}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.035, size = 19, normalized size = 0.8 \begin{align*} 2\,{\frac{1}{\sqrt{a}}{\it Artanh} \left ({\frac{\sqrt{a+b\cos \left ( x \right ) }}{\sqrt{a}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.72541, size = 278, normalized size = 11.58 \begin{align*} \left [\frac{\log \left (\frac{b^{2} \cos \left (x\right )^{2} + 8 \, a b \cos \left (x\right ) + 4 \,{\left (b \cos \left (x\right ) + 2 \, a\right )} \sqrt{b \cos \left (x\right ) + a} \sqrt{a} + 8 \, a^{2}}{\cos \left (x\right )^{2}}\right )}{2 \, \sqrt{a}}, -\frac{\sqrt{-a} \arctan \left (\frac{{\left (b \cos \left (x\right ) + 2 \, a\right )} \sqrt{b \cos \left (x\right ) + a} \sqrt{-a}}{2 \,{\left (a b \cos \left (x\right ) + a^{2}\right )}}\right )}{a}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan{\left (x \right )}}{\sqrt{a + b \cos{\left (x \right )}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.97136, size = 30, normalized size = 1.25 \begin{align*} -\frac{2 \, \arctan \left (\frac{\sqrt{b \cos \left (x\right ) + a}}{\sqrt{-a}}\right )}{\sqrt{-a}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]